Because str4 doesn't have a \0 to mark the end of the string.

So printf just keeps running through memory until it finds a \0.

In your case, that just happened to be your str3.

But it could have just as easily printed any random memory contents until it found a \0 (or crashed).